import config from "@/config"
import http from "@/utils/request"

export default {
  menu: {
    getMenus: {
      url: `${config.API_URL}/system/menu/getRouters`,
      name: "获取菜单",
      get: async function () {
        return await http.get(this.url)
      }
    },
    list: {
      url: `${config.API_URL}/system/menu/list`,
      name: "获取菜单",
      get: async function () {
        return await http.get(this.url)
      }
    },
    listMenu: {
      url: `${config.API_URL}/system/menu/list`,
      name: "查询菜单列表",
      get: async function (params) {
        return await http.get(this.url, params)
      }
    },
    getMenu: {
      url: `${config.API_URL}/system/menu/`,
      name: "查询菜单详细",
      get: async function (menuId) {
        return await http.get(this.url + menuId)
      }
    },
    treeselect: {
      url: `${config.API_URL}/system/menu/treeselect`,
      name: "查询树状菜单",
      get: async function () {
        return await http.get(this.url)
      }
    },
    roleMenuTreeselect: {
      url: `${config.API_URL}/system/menu/roleMenuTreeselect/`,
      name: "根据角色ID查询树状菜单",
      get: async function (roleId) {
        return await http.get(this.url + roleId)
      }
    },
    addMenu: {
      url: `${config.API_URL}/system/menu`,
      name: "新增菜单",
      post: async function (data) {
        return await http.post(this.url, data)
      }
    },
    updateMenu: {
      url: `${config.API_URL}/system/menu`,
      name: "修改菜单",
      put: async function (data) {
        return await http.put(this.url, data)
      }
    },
    delMenu: {
      url: `${config.API_URL}/system/menu/`,
      name: "删除菜单",
      delete: async function (menuId) {
        return await http.delete(this.url + menuId)
      }
    },
    dragMenu: {
      url: `${config.API_URL}/system/menu/menuDrag/`,
      name: "菜单移动",
      put: async function (dropType, dragMenuId, dropMenuId) {
        return await http.put(this.url + dropType + "/" + dragMenuId + "/" + dropMenuId)
      }
    }
  },
  config: {
    listConfig: {
      url: `${config.API_URL}/system/config/list`,
      name: "查询配置列表",
      get: async function (params) {
        return await http.get(this.url, params)
      }
    },
    getConfig: {
      url: `${config.API_URL}/system/config/`,
      name: "查询配置详细",
      get: async function (configId) {
        return await http.get(this.url + configId)
      }
    },
    getConfigKey: {
      url: `${config.API_URL}/system/config/configKey/`,
      name: "根据键名查值",
      get: async function (configKey) {
        return await http.get(this.url + configKey)
      }
    },
    addConfig: {
      url: `${config.API_URL}/system/config`,
      name: "新增参数配置",
      post: async function (data) {
        return await http.post(this.url, data)
      }
    },
    updateConfig: {
      url: `${config.API_URL}/system/config`,
      name: "修改参数配置",
      put: async function (data) {
        return await http.put(this.url, data)
      }
    },
    delConfig: {
      url: `${config.API_URL}/system/config/`,
      name: "删除参数配置",
      delete: async function (configId) {
        return await http.delete(this.url + configId)
      }
    },
    refreshCache: {
      url: `${config.API_URL}/system/config/refreshCache`,
      name: "刷新参数缓存",
      delete: async function () {
        return await http.delete(this.url)
      }
    }
  },
  dict: {
    type: {
      listType: {
        url: `${config.API_URL}/system/dict/type/list`,
        name: "查询字典类型列表",
        get: async function (params) {
          return await http.get(this.url, params)
        }
      },
      getType: {
        url: `${config.API_URL}/system/dict/type/`,
        name: "查询字典类型详细",
        get: async function (dictId) {
          return await http.get(this.url + dictId)
        }
      },
      addType: {
        url: `${config.API_URL}/system/dict/type`,
        name: "新增字典类型",
        post: async function (data) {
          return await http.post(this.url, data)
        }
      },
      editType: {
        url: `${config.API_URL}/system/dict/type`,
        name: "修改字典类型",
        put: async function (data) {
          return await http.put(this.url, data)
        }
      },
      delType: {
        url: `${config.API_URL}/system/dict/type/`,
        name: "删除字典类型",
        delete: async function (dictId) {
          return await http.delete(this.url + dictId)
        }
      },
      refreshCache: {
        url: `${config.API_URL}/system/dict/type/refreshCache`,
        name: "刷新字典缓存",
        delete: async function () {
          return await http.delete(this.url)
        }
      },
      optionselect: {
        url: `${config.API_URL}/system/dict/type/optionselect`,
        name: "获取字典选择框列表",
        get: async function () {
          return await http.get(this.url)
        }
      }
    },
    data: {
      listData: {
        url: `${config.API_URL}/system/dict/data/list`,
        name: "查询字典数据列表",
        get: async function (params) {
          return await http.get(this.url, params)
        }
      },
      getData: {
        url: `${config.API_URL}/system/dict/data/list`,
        name: "查询字典数据详细",
        get: async function (dictCode) {
          return await http.get(this.url + dictCode)
        }
      },
      getDicts: {
        url: `${config.API_URL}/system/dict/data/type/`,
        name: "查询字典数据详细",
        get: async function (dictType) {
          return await http.get(this.url + dictType)
        }
      },
      addData: {
        url: `${config.API_URL}/system/dict/data`,
        name: "新增字典数据",
        post: async function (data) {
          return await http.post(this.url, data)
        }
      },
      editData: {
        url: `${config.API_URL}/system/dict/data`,
        name: "修改字典数据",
        put: async function (data) {
          return await http.put(this.url, data)
        }
      },
      changeStatus: {
        url: `${config.API_URL}/system/dict/data/changeStatus`,
        name: "字典状态修改",
        put: async function (data) {
          return await http.put(this.url, data)
        }
      },
      changeSort: {
        url: `${config.API_URL}/system/dict/data/changeOrder`,
        name: "字典排序",
        put: async function (data) {
          return await http.put(this.url, data)
        }
      },
      delData: {
        url: `${config.API_URL}/system/dict/data/`,
        name: "删除字典数据",
        delete: async function (dictCode) {
          return await http.delete(this.url + dictCode)
        }
      }
    },
    tree: {
      url: `${config.API_URL}/system/dict/type/list`,
      name: "获取字典树",
      get: async function () {
        return await http.get(this.url)
      }
    },
    list: {
      url: `${config.API_URL}/system/dict/data/list`,
      name: "字典明细",
      get: async function (params) {
        return await http.get(this.url, params)
      }
    },
    get: {
      url: `${config.API_URL}/system/dict/data/type/`,
      name: "获取字典数据",
      get: async function (dictType) {
        return await http.get(this.url + dictType)
      }
    }
  },
  role: {
    list: {
      url: `${config.API_URL}/system/role/list`,
      name: "获取角色列表",
      get: async function (params) {
        return await http.get(this.url, params)
      }
    },
    getRoles: {
      url: `${config.API_URL}/system/role/roles`,
      name: "查询所有角色",
      get: async function () {
        return await http.get(this.url)
      }
    },
    getAllRoles: {
      url: `${config.API_URL}/system/role/roles/all`,
      name: "查询所有角色",
      get: async function () {
        return await http.get(this.url)
      }
    },
    delRole: {
      url: `${config.API_URL}/system/role/`,
      name: "删除角色",
      delete: async function (roleId) {
        return await http.delete(this.url + roleId)
      }
    },
    saveRole: {
      url: `${config.API_URL}/system/role`,
      name: "保存角色",
      post: async function (data) {
        return await http.post(this.url, data)
      }
    },
    updateRole: {
      url: `${config.API_URL}/system/role`,
      name: "更新角色",
      put: async function (data) {
        return await http.put(this.url, data)
      }
    },
    getRole: {
      url: `${config.API_URL}/system/role/`,
      name: "获取角色详情",
      get: async function (id) {
        return await http.get(this.url + id)
      }
    },
    sortRole: {
      url: `${config.API_URL}/system/role/sort`,
      name: "角色排序",
      put: async function (data) {
        return await http.put(this.url, data)
      }
    },
    changeStatus: {
      url: `${config.API_URL}/system/role/changeStatus`,
      name: "状态修改",
      put: async function (data) {
        return await http.put(this.url, data)
      }
    }
  },
  post: {
    list: {
      url: `${config.API_URL}/system/post/list`,
      name: "获取岗位列表",
      get: async function (params) {
        return await http.get(this.url, params)
      }
    },
    delPost: {
      url: `${config.API_URL}/system/post/`,
      name: "删除岗位",
      delete: async function (postId) {
        return await http.delete(this.url + postId)
      }
    },
    savePost: {
      url: `${config.API_URL}/system/post`,
      name: "保存岗位",
      post: async function (data) {
        return await http.post(this.url, data)
      }
    },
    updatePost: {
      url: `${config.API_URL}/system/post`,
      name: "更新岗位",
      put: async function (data) {
        return await http.put(this.url, data)
      }
    },
    getAllPost: {
      url: `${config.API_URL}/system/post/post/info`,
      name: "获取所有岗位列表",
      get: async function (params) {
        return await http.get(this.url, params)
      }
    }
  },
  dept: {
    list: {
      url: `${config.API_URL}/system/dept/list`,
      name: "获取部门列表",
      get: async function (params) {
        return await http.get(this.url, params)
      }
    },
    childList: {
      url: `${config.API_URL}/system/dept/childList/`,
      name: "获取子部门列表",
      get: async function (parentId) {
        return await http.get(this.url + parentId)
      }
    },
    tree: {
      url: `${config.API_URL}/system/dept/treeselect`,
      name: "获取部门列表",
      get: async function (params) {
        return await http.get(this.url, params)
      }
    },
    roleDeptTree: {
      url: `${config.API_URL}/system/dept/roleDeptTreeselect/`,
      name: "根据角色ID查询树状部门",
      get: async function (roleId) {
        return await http.get(this.url + roleId)
      }
    },
    addDept: {
      url: `${config.API_URL}/system/dept`,
      name: "新增部门",
      post: async function (data) {
        return await http.post(this.url, data)
      }
    },
    deptModify: {
      url: `${config.API_URL}/system/dept/modify`,
      name: "修改部门",
      put: async function (data) {
        return await http.put(this.url, data)
      }
    },
    updateDept: {
      url: `${config.API_URL}/system/dept`,
      name: "修改部门",
      put: async function (data) {
        return await http.put(this.url, data)
      }
    },
    changeStatus: {
      url: `${config.API_URL}/system/dept/changeStatus`,
      name: "设置状态",
      put: async function (data) {
        return await http.put(this.url, data)
      }
    },
    deleteDept: {
      url: `${config.API_URL}/system/dept/`,
      name: "删除部门",
      delete: async function (deptId) {
        return await http.delete(this.url + deptId)
      }
    },
    getDept: {
      url: `${config.API_URL}/system/dept/`,
      name: "部门详情",
      get: async function (deptId) {
        return await http.get(this.url + deptId)
      }
    },
	setDeptAdmin: {
		url: `${config.API_URL}/system/dept/admin`,
		name: "设置部门主管",
		post: async function (data) {
			 return await http.post(this.url, data)
		}
	},
  },
  user: {
    getInfo: {
      url: `${config.API_URL}/system/user/getInfo`,
      name: "获取用户信息",
      get: async function () {
        return await http.get(this.url)
      }
    },
    list: {
      url: `${config.API_URL}/system/user/list`,
      name: "获取用户列表",
      get: async function (params) {
        return await http.get(this.url, params)
      }
    },
    roleList: {
      url: `${config.API_URL}/system/user/role/users`,
      name: "获取用户列表",
      get: async function (params) {
        return await http.get(this.url, params)
      }
    },
    getUser: {
      url: `${config.API_URL}/system/user/`,
      name: "获取用户列表",
      get: async function (userId) {
        return await http.get(this.url + userId)
      }
    },
    addUser: {
      url: `${config.API_URL}/system/user`,
      name: "新增用户",
      post: async function (data) {
        return await http.post(this.url, data)
      }
    },
    updateUser: {
      url: `${config.API_URL}/system/user`,
      name: "修改用户",
      put: async function (data) {
        return await http.put(this.url, data)
      }
    },
    delUser: {
      url: `${config.API_URL}/system/user/`,
      name: "删除用户",
      delete: async function (userId) {
        return await http.delete(this.url + userId)
      }
    },
    resetUserPwd: {
      url: `${config.API_URL}/system/user/resetPwd`,
      name: "用户密码重置",
      put: async function (userId, password) {
        const data = {
          userId,
          password
        }
        return await http.put(this.url, data)
      }
    },
    changeUserStatus: {
      url: `${config.API_URL}/system/user/changeStatus`,
      name: "用户状态修改",
      put: async function (userId, status) {
        const data = {
          userId,
          status
        }
        return await http.put(this.url, data)
      }
    },
    getUserProfile: {
      url: `${config.API_URL}/system/user/profile`,
      name: "查询用户个人信息",
      get: async function () {
        return await http.get(this.url)
      }
    },
    updateUserProfile: {
      url: `${config.API_URL}/system/user/profile`,
      name: "修改用户个人信息",
      put: async function (data) {
        return await http.put(this.url, data)
      }
    },
    updateUserPwd: {
      url: `${config.API_URL}/system/user/profile/updatePwd`,
      name: "用户密码重置",
      put: async function (oldPassword, newPassword) {
        var params = "?oldPassword=" + oldPassword + "&newPassword=" + newPassword;
        return await http.put(this.url + params)
      }
    },
    uploadAvatar: {
      url: `${config.API_URL}/system/user/profile/avatar`,
      name: "用户头像上传",
      post: async function (data) {
        return await http.post(this.url, data)
      }
    },
    getAuthRole: {
      url: `${config.API_URL}/system/user/authRole/`,
      name: "查询授权角色",
      get: async function (userId) {
        return await http.get(this.url + userId)
      }
    },
    updateAuthRole: {
      url: `${config.API_URL}/system/user/authRole`,
      name: "保存授权角色",
      put: async function (data) {
        return await http.put(this.url, data)
      }
    },
    getUsers: {
      url: `${config.API_URL}/system/user/users?id=`,
      name: "保存授权角色",
      get: async function (userId) {
        return await http.get(this.url + userId)
      }
    },
    getUserConnect: {
      url: `${config.API_URL}/system/user/connect/`,
      name: "获取用户连接",
      get: async function (userId) {
        return await http.get(this.url + userId)
      }
    }
    // //
    // export const getUserInfoByList = ids => {
    // 	return request({
    // 	url: '/system/user/base/details',
    // 	method: 'post',
    // 	data: { ids }
    // 	})
    // }

    // export const queryUserList = userIds => {
    // 	return request({
    // 	url: '/system/user/user/list',
    // 	method: 'post',
    // 	data: {userIds}
    // 	})
    // }
  },
  logs: {
    list: {
      url: `${config.API_URL}/system/operlog/list`,
      name: "日志列表",
      get: async function (params) {
        return await http.get(this.url, params)
      }
    },
	loginList: {
		url: `${config.API_URL}/system/logininfor/list`,
		name: "登录日志列表",
		get: async function (params) {
			return await http.get(this.url, params)
		}
	},
	taskLogList: {
		url: `${config.API_URL}/system/operlog/task/list`,
		name: "接口调用日志列表",
		get: async function (params) {
			return await http.get(this.url, params)
		}
	},

    delLog: {
      url: `${config.API_URL}/system/operlog/`,
      name: "删除日志",
      delete: async function (operId) {
        return await http.delete(this.url + operId)
      }
    },
    cleanlog: {
      url: `${config.API_URL}/system/operlog/clean`,
      name: "清空日志",
      delete: async function () {
        return await http.delete(this.url)
      }
    }
  },
  table: {
    list: {
      url: `${config.API_URL}/system/table/list`,
      name: "表格列管理列表",
      get: async function (params) {
        return await http.get(this.url, params)
      }
    },
    info: {
      url: `${config.API_URL}/system/table/info`,
      name: "表格列管理详情",
      get: async function (params) {
        return await http.get(this.url, params)
      }
    }
  },
  tasks: {
    list: {
      url: `${config.API_URL}/system/tasks/list`,
      name: "系统任务管理",
      get: async function (params) {
        return await http.get(this.url, params)
      }
    }
  },
  area: {
    list: {
      url: `${config.API_URL}/system/area/list`,
      name: "行政区划列表",
      get: async function (params) {
        return await http.get(this.url, params)
      }
    },
    info: {
      url: `${config.API_URL}/system/area/`,
      name: "行政区划详情",
      get: async function (code) {
        return await http.get(this.url + code)
      }
    },
    addArea: {
      url: `${config.API_URL}/system/area`,
      name: "新增行政区划",
      post: async function (data) {
        return await http.post(this.url, data)
      }
    },
    updateArea: {
      url: `${config.API_URL}/system/area`,
      name: "修改行政区划",
      put: async function (data) {
        return await http.put(this.url, data)
      }
    },
    delArea: {
      url: `${config.API_URL}/system/area/`,
      name: "删除行政区划",
      delete: async function (code) {
        return await http.delete(this.url + code)
      }
    }
  },
  job: {
    list: {
      url: `${config.API_URL}/schedule/job/list`,
      name: "定时任务调度列表",
      get: async function (query) {
        return await http.get(this.url, query)
      }
    },
    info: {
      url: `${config.API_URL}/schedule/job/`,
      name: "定时任务调度详细",
      get: async function (jobId) {
        return await http.get(this.url + jobId)
      }
    },
    add: {
      url: `${config.API_URL}/schedule/job`,
      name: "新增定时任务调度",
      post: async function (data) {
        return await http.post(this.url, data)
      }
    },
    edit: {
      url: `${config.API_URL}/schedule/job`,
      name: "修改定时任务调度",
      put: async function (data) {
        return await http.put(this.url, data)
      }
    },
    delete: {
      url: `${config.API_URL}/schedule/job/`,
      name: "删除定时任务调度",
      delete: async function (jobId) {
        return await http.delete(this.url + jobId)
      }
    },
    changeStatus: {
      url: `${config.API_URL}/schedule/job/changeStatus`,
      name: "任务状态修改",
      put: async function (jobId, status) {
        const data = {
          jobId,
          status
        }
        return await http.put(this.url, data)
      }
    },
    logList: {
      url: `${config.API_URL}/schedule/job/log/list`,
      name: "调度日志列表",
      get: async function (query) {
        return await http.get(this.url, query)
      }
    }
  },
  member: {
    list: {
      url: `${config.API_URL}/system/member/list`,
      name: "会员用户列表",
      get: async function (query) {
        return await http.get(this.url, query)
      }
    },
    listByRole: {
      url: `${config.API_URL}/system/member/listByRole`,
      name: "会员用户列表",
      get: async function (query) {
        return await http.get(this.url, query)
      }
    },
    listByPost: {
      url: `${config.API_URL}/system/member/listByPost`,
      name: "会员用户列表",
      get: async function (query) {
        return await http.get(this.url, query)
      }
    },
    getUser: {
      url: `${config.API_URL}/system/member/`,
      name: "会员用户详情",
      get: async function (memberId) {
        return await http.get(this.url + memberId)
      }
    },
    addUser: {
      url: `${config.API_URL}/system/member`,
      name: "新增会员用户",
      post: async function (data) {
        return await http.post(this.url, data)
      }
    },
    updateUser: {
      url: `${config.API_URL}/system/member`,
      name: "修改会员用户",
      put: async function (data) {
        return await http.put(this.url, data)
      }
    },
    resetUserPwd: {
      url: `${config.API_URL}/system/member/resetPwd`,
      name: "用户密码重置",
      put: async function (memberId, password) {
        const data = {
          memberId,
          password
        }
        return await http.put(this.url, data)
      }
    },
    changeStatus: {
      url: `${config.API_URL}/system/member/changeStatus`,
      name: "会员状态修改",
      put: async function (memberId, status) {
        const data = {
          memberId,
          status
        }
        return await http.put(this.url, data)
      }
    },
    delUser: {
      url: `${config.API_URL}/system/member/`,
      name: "删除会员用户",
      delete: async function (memberId) {
        return await http.delete(this.url + memberId)
      }
    },
    addUserPost: {
      url: `${config.API_URL}/system/member/addPost`,
      name: "批量增加岗位会员",
      post: async function (postId, memberIds) {
        const data = {
          postId: postId,
          memberIds: memberIds
        }
        return await http.post(this.url, data)
      }
    },
    delUserPost: {
      url: `${config.API_URL}/system/member/removePost/`,
      name: "从岗位中删除会员",
      delete: async function (memberIds) {
        return await http.delete(this.url + memberIds)
      }
    },
    addUserRole: {
      url: `${config.API_URL}/system/member/addRole`,
      name: "批量增加角色会员",
      post: async function (roleId, memberIds) {
        const data = {
          roleId: roleId,
          memberIds: memberIds
        }
        return await http.post(this.url, data)
      }
    },
    delUserRole: {
      url: `${config.API_URL}/system/member/removeRole/`,
      name: "从角色中删除会员",
      delete: async function (memberIds) {
        return await http.delete(this.url + memberIds)
      }
    },
    getPostRole: {
      url: `${config.API_URL}/system/user/`,
      name: "获取岗位和角色",
      get: async function () {
        return await http.get(this.url)
      }
    },
    getMemberByDept: {
      list: {
        url: `${config.API_URL}/system/member/dept/member`,
        name: "根据部门查询会员用户列表",
        get: async function (query) {
          return await http.get(this.url, query)
        }
      }
    },
    getMemberByRole: {
      list: {
        url: `${config.API_URL}/system/member/role/member`,
        name: "根据角色查询会员用户列表",
        get: async function (query) {
          return await http.get(this.url, query)
        }
      }
    },
    getMembers: {
      url: `${config.API_URL}/system/member/members`,
      name: "会员用户列表-不带分页",
      get: async function (query) {
        return await http.get(this.url, query)
      }
    },
    searchDev: {
      url: `${config.API_URL}/system/dev/search`,
      name: "根据手机号查询开发者",
      get: async function (query) {
        return await http.get(this.url, query)
      }
    },
    addDev: {
      url: `${config.API_URL}/system/dev/add`,
      name: "新增开发人员",
      post: async function (data) {
        return await http.post(this.url, data)
      }
    },
    getDevList: {
      url: `${config.API_URL}/system/dev/developer/`,
      name: "根据应用ID查询开发者",
      get: async function (appId) {
        return await http.get(this.url + appId)
      }
    },
    delDev: {
      url: `${config.API_URL}/system/dev/`,
      name: "删除开发者",
      delete: async function (memberIds) {
        return await http.delete(this.url + memberIds)
      }
    },
    checkAdmin: {
      url: `${config.API_URL}/system/dev/admin/`,
      name: "校验是否应用管理员",
      get: async function (appId) {
        return await http.get(this.url + appId)
      }
    }
  },
  template: {
    list: {
      url: `${config.API_URL}/system/template/list`,
      name: "消息模板列表",
      get: async function (query) {
        return await http.get(this.url, query)
      }
    },
    getTemplate: {
      url: `${config.API_URL}/system/template/`,
      name: "消息模板详情",
      get: async function (id) {
        return await http.get(this.url + id)
      }
    },
    getUserTemplate: {
      url: `${config.API_URL}/system/template/user`,
      name: "消息模板详情",
      get: async function (data) {
        return await http.get(this.url, data)
      }
    },
    addTemplate: {
      url: `${config.API_URL}/system/template`,
      name: "新增消息模板",
      post: async function (data) {
        return await http.post(this.url, data)
      }
    },
    updateTemplate: {
      url: `${config.API_URL}/system/template`,
      name: "修改消息模板",
      put: async function (data) {
        return await http.put(this.url, data)
      }
    },
    delTemplate: {
      url: `${config.API_URL}/system/template/`,
      name: "删除消息模板",
      delete: async function (id) {
        return await http.delete(this.url + id)
      }
    },
    channelList: {
      url: `${config.API_URL}/system/message/config/list`,
      name: "发送渠道列表",
      get: async function (query) {
        return await http.get(this.url, query)
      }
    },
    addChannel: {
      url: `${config.API_URL}/system/message/config`,
      name: "新增渠道配置",
      post: async function (data) {
        return await http.post(this.url, data)
      }
    },
    updateChannel: {
      url: `${config.API_URL}/system/message/config`,
      name: "修改渠道配置",
      put: async function (data) {
        return await http.put(this.url, data)
      }
    }
  },
  dataList: {
    getConfig: {
      url: `${config.API_URL}/system/data/config/app/`,
      name: "存在数据源",
      get: async function (appId) {
        return await http.get(this.url + appId)
      }
    },
    addConfig: {
      url: `${config.API_URL}/system/data/config`,
      name: "新增数据源",
      post: async function (data) {
        return await http.post(this.url, data)
      }
    },
    modelSave: {
      url: `${config.API_URL}/system/model/save`,
      name: "模型数据保存",
      post: async function (data) {
        return await http.post(this.url, data)
      }
    },
    modelTemplate: {
      url: `${config.API_URL}/system/model/template`,
      name: "模型模板",
      get: async function (params, config) {
        return await http.get(this.url, params, config)
      }
    },
    modelImport: {
      url: `${config.API_URL}/system/model/import`,
      name: "模型数据导入",
      post: async function (data, paramsStr) {
        return await http.post(this.url + paramsStr, data)
      }
    },
    modelExport: {
      url: `${config.API_URL}/system/model/page/export`,
      name: "模型数据导出",
      post: async function (data, config) {
        return await http.post(this.url, data, config)
      }
    }
  },
  online: {
    list: {
      url: `${config.API_URL}/system/online/list`,
      name: "在线用户列表",
      get: async function (query) {
        return await http.get(this.url, query)
      }
    },
    forceLogout: {
      url: `${config.API_URL}/system/online/`,
      name: "强退用户",
      delete: async function (tokenId) {
        return await http.delete(this.url + tokenId)
      }
    }
  },
  msg: {
    list: {
      url: `${config.API_URL}/system/msg/list`,
      name: "消息记录列表",
      get: async function (query) {
        return await http.get(this.url, query)
      }
    },
    configs: {
      url: `${config.API_URL}/system/message/config/configs`,
      name: "消息记录列表",
      get: async function (query) {
        return await http.get(this.url, query)
      }
    }
  },
  dataView: {
    view: {
      url: `${config.API_URL}/system/use/log/view/`,
      name: "数据中心统计",
      get: async function (appId) {
        return await http.get(this.url + appId)
      }
    },
    flow: {
      url: `${config.API_URL}/system/use/log/flow/`,
      name: "应用流量统计",
      get: async function (appId) {
        return await http.get(this.url + appId)
      }
    },
    model: {
      url: `${config.API_URL}/system/use/log/model/`,
      name: "应用数据总览统计",
      get: async function (appId) {
        return await http.get(this.url + appId)
      }
    },
	appView: {
		 url: `${config.API_URL}/system/app/statistics`,
		 name: "控制台应用统计",
		 get: async function () {
			 return await http.get(this.url)
		 }
	},
  }
}
